package com.xiaoka.ins.corp.api.gpic.help;

import java.util.HashMap;

import org.springframework.util.Assert;

import com.xiaoka.ins.corp.api.utils.BaseUtils;

/**
 *  
 *  采集参数
 * @author zheng
 *
 */
public class ParameterAcquisition {
	
	private static final String mark1 = " 参考价(";
	
	private static final String mark2 = "机动车损失";
	
	/**
	 * 获取新车购置价(含税)
	 * @param str
	 * @return
	 */
	public static String getPurchasePriceIncludeTax(String str){
		Assert.hasText(str);
		return BaseUtils.getBetweenStr(str, mark1,")");
	}
	
	/**
	 * 获取机动车损失险保额
	 * @param map
	 * @return
	 */
	public static String getRiskValue(HashMap<String,String> map){
		return map.get("label").contains(mark2)?BaseUtils.getBetweenStr(map.get("data"),";", ":"):map.get("value");
	}

}
